

export default {
  state: {
    isCollapse:false,
    tabList:[
      {
        path: "/",
        name: "home",
        lable: "首页",
        icon: "s-home",
        url: "Home/home",
      },
    ],
    currentMeun:null
  },
  getters: {
  },
  mutations: {
    collapseMenu(state){
        state.isCollapse = !state.isCollapse
    },
    selectMeun(state,val){
      if(val.name != 'home'){
        state.currentMeun = val;
        const result = state.tabList.findIndex(item=>item.name===val.name);
        if(result=== -1){
          state.tabList.push(val)
        }

      }else{
        state.currentMeun = null
      }
    },
    closeTag(state,val){
      let result = state.tabList.findIndex(item=>item.name ===val.name);
      state.tabList.splice(result,1)
    }
  },
  actions: {
  },
  modules: {
  
  }
}
